﻿@model SAKS.ViewModels.UserInRoleModel

@{
    ViewBag.Title = "向角色追加用户";
}

<h2>向角色追加用户</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>



@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
        <div class="editor-label">
            @Html.LabelFor(model => model.Role)
        </div>
        <div class="editor-label">
            @Html.EditorFor(model => model.Role)
            @Html.ValidationMessageFor(model => model.Role)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <p>
            <input type="submit" value="追加" />
                @if (ViewData["message"] != null)
                {
                    <span style="color:Red">@ViewData["message"].ToString()</span>
                }
        </p>
}


<div>
    @Html.ActionLink("返回角色成员列表", "UsersInRole", new { role = Model.Role })
</div>

